package com.yxb.consumer.feign;

import com.yxb.consumer.feign.config.FeignConfig;
import com.yxb.consumer.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @PackgeName: com.yxb.consumer.feign
 * @ClassName: UserFeign
 * @Author: CongR
 * Date: 2021/3/18 15:27
 * project name: springcloud
 * @Version:
 * @Description:
 */
@FeignClient(value = "user-service",fallback = userClientFallback.class,
configuration = FeignConfig.class)
public interface UserFeign {

    @GetMapping("/user/{id}")
    User queryById(@PathVariable Long id);

}
